<?php

namespace app\mobileapp\validate;

use think\Validate;

class Comment extends Validate
{

    protected $rule = [
        'content_id' => 'require',
        'content' => 'require',
        'type' => 'require|between:1,2',
    ];

    protected $message = [
        'content_id.require' => '内容id不能为空',
        'content.require' => '评论内容不能为空',
        'type.between' => '类型只能是报名或者评论',
    ];


    protected $scene = [
        'comment' => ['content_id', 'content'], //评论
        'signUp' => ['content_id'], //报名
    ];

}